Optimal. Leaf size=53 \[ -\frac {b e n x^r}{r^2}+\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {14, 2393, 2338,
2341} \begin {gather*} \frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{r}-\frac {b e n x^r}{r^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 2338
Rule 2341
Rule 2393
Rubi steps
\begin {align*} \int \frac {\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x^{-1+r} \left (a+b \log \left (c x^n\right )\right )\right ) \, dx\\ &=d \int \frac {a+b \log \left (c x^n\right )}{x} \, dx+e \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-\frac {b e n x^r}{r^2}+\frac {e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 51, normalized size = 0.96 \begin {gather*} -\frac {1}{2} b d n \log ^2(x)+d \log (x) \left (a+b \log \left (c x^n\right )\right )+\frac {e x^r \left (-b n+a r+b r \log \left (c x^n\right )\right )}{r^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.10, size = 278, normalized size = 5.25
method | result | size |
risch | \(\frac {b \left (d r \ln \left (x \right )+e \,x^{r}\right ) \ln \left (x^{n}\right )}{r}-\frac {i \mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \right ) d b \pi \ln \left (x \right )}{2}+\frac {i \ln \left (x \right ) \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i \ln \left (x \right ) \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i \mathrm {csgn}\left (i c \,x^{n}\right )^{3} d b \pi \ln \left (x \right )}{2}-\frac {i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x^{r}}{2 r}+\frac {i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{r}}{2 r}+\frac {i \pi b e \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{r}}{2 r}-\frac {i \pi b e \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x^{r}}{2 r}-\frac {b d n \ln \left (x \right )^{2}}{2}+\ln \left (x \right ) \ln \left (c \right ) b d +\ln \left (x \right ) a d +\frac {\ln \left (c \right ) b e \,x^{r}}{r}+\frac {a \,x^{r} e}{r}-\frac {b e n \,x^{r}}{r^{2}}\) | \(278\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 56, normalized size = 1.06 \begin {gather*} \frac {b e x^{r} \log \left (c x^{n}\right )}{r} + \frac {b d \log \left (c x^{n}\right )^{2}}{2 \, n} + a d \log \left (x\right ) - \frac {b e n x^{r}}{r^{2}} + \frac {a e x^{r}}{r} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 69, normalized size = 1.30 \begin {gather*} \frac {b d n r^{2} \log \left (x\right )^{2} + 2 \, {\left (b n r e \log \left (x\right ) + b r e \log \left (c\right ) - {\left (b n - a r\right )} e\right )} x^{r} + 2 \, {\left (b d r^{2} \log \left (c\right ) + a d r^{2}\right )} \log \left (x\right )}{2 \, r^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 131 vs.
\(2 (46) = 92\).
time = 5.23, size = 131, normalized size = 2.47 \begin {gather*} \begin {cases} \left (a + b \log {\left (c \right )}\right ) \left (d + e\right ) \log {\left (x \right )} & \text {for}\: n = 0 \wedge r = 0 \\\left (d + e\right ) \left (\begin {cases} a \log {\left (x \right )} & \text {for}\: b = 0 \\- \left (- a - b \log {\left (c \right )}\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\left (- a - b \log {\left (c x^{n} \right )}\right )^{2}}{2 b n} & \text {otherwise} \end {cases}\right ) & \text {for}\: r = 0 \\\left (a + b \log {\left (c \right )}\right ) \left (d \log {\left (x \right )} + \frac {e x^{r}}{r}\right ) & \text {for}\: n = 0 \\\frac {a d \log {\left (c x^{n} \right )}}{n} + \frac {a e x^{r}}{r} + \frac {b d \log {\left (c x^{n} \right )}^{2}}{2 n} - \frac {b e n x^{r}}{r^{2}} + \frac {b e x^{r} \log {\left (c x^{n} \right )}}{r} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.72, size = 69, normalized size = 1.30 \begin {gather*} \frac {1}{2} \, b d n \log \left (x\right )^{2} + \frac {b n x^{r} e \log \left (x\right )}{r} + b d \log \left (c\right ) \log \left (x\right ) + \frac {b x^{r} e \log \left (c\right )}{r} + a d \log \left (x\right ) - \frac {b n x^{r} e}{r^{2}} + \frac {a x^{r} e}{r} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\left (d+e\,x^r\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________